A popular technique for image processing is to apply a bilateral (BL) filter to an image. A BL filter is a filter which computes new values for pixels in an image based on the spatial closeness as well as the photometric similarity of neighboring pixels in the image.
BL filtering is becoming the de-facto noise filtering for computer vision systems, such as for Advanced Driver Assistance Systems (ADAS), due to its edge-preserving property. ADAS is implemented by an automotive vision control system which processes digital information from imaging sources including digital cameras, lasers, radar and other sensors to perform tasks such as lane departure warning, drowsiness sensors, and parking assistance. In such a vision control system a vision sensor may be embodied as a system-on-a-chip (SoC) that includes a BL filter for noise filtering that is coupled to a processor such as a digital signal processor (DSP) or other processor.
Conventional BL filtering uses a direct formula implementation in essentially real-time (on-the-fly) utilizing the known standard BL filter equation shown below, where p is the center pixel and q are the neighboring pixels.
            BF      ⁡              [        I        ]              p    =            1      /      Wp        ⁢                  ⁢                  ∑                  q          ⁢                                          ⁢          ɛ          ⁢                                          ⁢          S                    ⁢              G        ⁢                                  ⁢                                            σ              s                        ⁡                          (                                                                p                  -                  q                                                            )                                ·          G                ⁢                                  ⁢                              σ            r                    ⁡                      (                                                        Ip                -                Iq                                                    )                          ⁢                  I          q                    where BF[I]p is the filtered output, 1/Wp is the normalization factor, Gσs (∥p−q∥ is the space (i.e., distance) weight, Gσr (|Ip−Iq|) is the range (i.e., intensity) weight, and Iq is the input pixel being filtered. The respective weights are each calculated as a product of two Gaussian functions. In 2-dimensions (x,y) an isotropic (i.e. circularly symmetric) Gaussian function has the following form:
      G    ⁡          (              x        ,        y            )        =            1              2        ⁢                                  ⁢        π        ⁢                                  ⁢                  σ          2                      ⁢          e              -                                            x              2                        +                          y              2                                            2            ⁢                                                  ⁢                          σ              2                                          where σ is the standard deviation (or variance) of the distribution.
To support multiple ranges and distances, a sigma (σ) calculation is performed, per the above direct formula, where σ being the variance which defines the amount of blurring. To employ adaptive BL filtering, a complex content adaption using local σ is generally used.